
#ifndef _GameState_H_
#define _GameState_H_

#include "Team.h"
#include "Player.h"

#include <vector>


class GameState {

  public:
    static GameState& instance(void);
    static void reset(void);

    void addPlayerToTeam(Player *player, unsigned team_id);
    
    int getTeamScore(unsigned team_id);
    void changeTeamScore(unsigned team_id, int score_delta);
 
    unsigned teamIdFromPixelColour(unsigned char r, unsigned char g, unsigned char b); 

    Team& getTeam(unsigned team_id);

  private:

    std::vector<Team> teams;

    // Since this is a singleton, all these should be private.
    GameState();
    GameState(const GameState&);
    GameState& operator=(const GameState&);
    ~GameState();
};

#endif

